# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>

pkgname=selene
pkgver=0.25.0
pkgrel=1
pkgdesc='Blazing-fast modern Lua linter written in Rust'
arch=('loong64' 'x86_64')
url=https://github.com/Kampfkarren/selene
license=('MPL2')
depends=('gcc-libs' 'openssl')
makedepends=('rust')
conflicts=("$pkgname-linter")
replaces=("$pkgname-linter")
options=('!lto')
source=("$url/archive/$pkgver/$pkgname-$pkgver.tar.gz")
b2sums=('2760600beeb00cdea417a21d4e0d9017c1c91e073e3569db7264e87107acf3ac2e657b501e65b596ad5c703fd3cb4283cbba03eb0c5198d0cfd9af7a0cebca81')

prepare() {
  cd $pkgname-$pkgver
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  cd $pkgname-$pkgver
  cargo build --release --locked --offline
}

check() {
  cd $pkgname-$pkgver
  cargo test --locked --offline
}

package() {
  cd $pkgname-$pkgver
  install -Dt "$pkgdir"/usr/bin target/release/$pkgname
}

# vim:set ts=2 sw=2 et:
